package demo.sicau.votesystem.dao;

import demo.sicau.votesystem.entity.PO.UserPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Mapper
public interface UserDao {

    List<UserPO> selectUsers();

    UserPO selectUserByPwdAndUsername(@Param("username") String username,
                                      @Param("password") String password);

    List<UserPO> selectUsersByPaging(@Param("index") int i, @Param("limit") int limit);

    int selectUserCount();

    UserPO selectUserById(@Param("uid") String uid);

    boolean deleteUserById(@Param("uid") String uid);

    boolean insertUser(@Param("userPO") UserPO userPO);

    boolean updateUser(@Param("userPO") UserPO userPO);
}


